<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/5/17 0017
 * Time: 上午 9:52
 */
$data = file_get_contents('http://www.mth5.com/Api/Items/itemInfo/iid/542532565108');
//var_dump($data);
$return =json_decode($data,true);
//var_dump($return);
//print_r($return);
//ajax(['message'=>$return]);

$iid=$return['data']['item']['num_iid'];
$price=$return['data']['item']['price'];
$title=$return['data']['item']['title'];
$pic_url=$return['data']['item']['pic_url'];


echo "<table>";
echo "<h2>信息列表:<h2>";
echo "<tr><tb>商品ID:</tb><tb>$iid</tb></tr><br>";
echo "<tr><tb>商品名称:</tb><tb>$title</tb></tr><br>";
echo "<tr><tb>商品价格:</tb><tb>$price</tb></tr>";
echo "<tr><tb>$pic_url</tb></tr>"
echo "</table>";